const express = require('express')
const app = express()

app.use((req, res, next) => {
  console.log(111)
  // ✨中间件内部调用了 next 函数后, 才会执行往后的环节代码(如果下一个中间没有next, 则依旧停在那)
  next()
})

app.use((req, res, next) => {
  console.log(222)
})

// app.use((req, res, next) => {
//   console.log(333)
// })

const port = 3001
app.listen(port, () => {
  console.log(`Server running at http://localhost:${port}`)
})
